const router = require('express').Router()
const passport = require('passport')
const GoogleStrategy = require( 'passport-google-oauth2' ).Strategy;
const User = require('../models/user.model.js')
const Product = require('../models/product.model.js')

// TODO comment posting
router.post('/',  (req, res) => {
    const productSave = new Product({
        comment: req.body.com,
        userId: req.user,
        verified: false,
    }).save().then((newProduct) =>{
		console.log('new product created' + newProduct)
        res.redirect('/')
	})
});

module.exports = router
